{% extends 'blogs/common/base.html' %}

{% block content %}
    <div class="layui-container">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md9">
                {% if articles %}
                    <div class="record-list">
                        {% for key, value in record_dict.items() %}
                            <div class="layui-timeline-item">
                                <i class="layui-icon layui-timeline-axis"></i>
                                <div class="layui-timeline-content layui-text">
                                    <h3 class="layui-timeline-title">{{ key }}</h3>
                                    <ul style="padding-left: 0">
                                        {% for val in value %}
                                            <li style="list-style-type: none">
                                                <i class="layui-icon">&#xe60a;</i>&nbsp;
                                                <a href="{{ url_for('blogs.article',article_id=val.id) }}">{{ val.title }}</a>
                                            </li>
                                        {% endfor %}
                                    </ul>
                                </div>
                            </div>
                        {% endfor %}
                    </div>
                {% else %}
                    <div class="post-card">
                        <p style="text-align: center;font-size: 18px;margin-top: 30px; color: #959595">一篇文章都没有呢~</p>
                    </div>
                {% endif %}
            </div>
            <div class="layui-col-md3">
                {% include 'blogs/common/sidebar.html' %}
            </div>
        </div>
    </div>
{% endblock %}